package com.hui.admin.common.enums;

import lombok.Getter;

/**
 * 错误码
 */
public enum ErrorCodeEnum {

    SERVICE_EXECUTE_FAILED("10000", "服务执行失败"),
    USERNAME_NOT_EXISTS("10001", "用户名不存在"),
    CREATE_CAPTCHA_ERROR("10002", "验证码生成失败"),
    CAPTCHA_EXPIRED("10003", "验证码过期"),
    CAPTCHA_MISMATCH("10004", "验证码错误"),
    USERNAME_EXISTS("10005", "用户名已存在"),
    PHONE_EXISTS("10006", "手机号已存在"),
    EMAIL_EXISTS("10007", "邮箱已存在"),
    USER_INSERT_FAILED("10008", "用户新增失败"),
    USER_UPDATE_FAILED("10009", "用户修改失败"),
    USER_NOT_EXISTS("100010", "用户不存在"),
    PHONE_FORMAT_ERROR("10011", "手机号格式不正确"),
    INVALID_PARAMS("10012", "参数异常"),
    EXPORT_FAILED("10013", "导出失败"),
    PASSWORD_ERROR("10014", "密码错误"),
    FILE_NOT_EXIST("10015", "文件不存在"),
    FILE_EMPTY("10016", "文件为空"),
    TOKEN_NOT_EXIST("10017", "令牌不存在"),
    TOKEN_PARSE_ERROR("10018", "令牌解析失败"),
    AGREEMENT_NOT_ACCEPTED("10019", "未接受协议"),
    PASSWORD_RESET_FAILED("10020", "密码重置失败"),
    SERIALIZE_ERROR("10021", "序列化失败"),
    USER_DISABLED("10022", "用户已禁用"),
    PASSWORD_NOT_MATCH("10023", "密码不一致"),
    PASSWORD_NOT_CHANGE("10024", "确认密码错误"),
    ANNOUNCEMENT_ADD_FAILED("10025", "公告新增失败"),
    ANNOUNCEMENT_DELETE_FAILED("10026", "公告删除失败"),
    ANNOUNCEMENT_NOT_EXISTS("10027", "公告不存在"),
    ANNOUNCEMENT_EXISTS("10028", "公告已存在"),
    ANNOUNCEMENT_TITLE_EXISTS("10028", "公告标题已存在"),
    FILE_NOT_VIDEO("10029", "只允许上传视频文件"),
    FILE_UPLOAD_FAILED("10030", "文件上传失败"),
    FILE_READ_ERROR("10031", "文件读取失败"),
    ENCODING_ERROR("10032", "编码错误"),
    IO_ERROR("10033", "IO错误"),
    FILE_TYPE_NOT_ALLOWED("10034", "文件类型错误"),
    ARTICLE_ADD_FAILED("10035", "文章新增失败"),
    ARTICLE_NOT_EXISTS("10036", "文章不存在"),
    CATEGORY_ADD_FAILED("10037", "分类新增失败"),
    CATEGORY_NOT_EXISTS("10038", "分类不存在"),
    USER_NOT_LOGIN("10039", "用户没有登录"),
    AUDIT_NOT_EXISTS("10040", "审核不存在"),
    BOOK_ADD_FAILED("10041", "图书新增失败"),
    BOOK_NOT_EXISTS("10042", "图书不存在"),
    DELETE_FAILED("10042", "删除失败");

    @Getter
    private final String code;

    @Getter
    private final String message;

    ErrorCodeEnum(String code, String message) {
        this.code = code;
        this.message = message;
    }
}
